package com.erb.controller.llb;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * basic
 *
 * @author Administrator
 */
@Controller
@RequestMapping("/base")
public class BaseController {

	/**
	 * 关于我们
	 *
	 * @return
	 */
	@GetMapping("/company-profile")
	public String companyProfile() {
		return "home/about/company-profile";
	}

	/**
	 * 帮助中心
	 *
	 * @return
	 */
	@GetMapping("/help")
	public String help() {
		return "home/about/help";
	}

	/**
	 * 联系我们
	 *
	 * @return
	 */
	@GetMapping("/contact")
	public String contact() {
		return "home/other/contact";
	}

	/**
	 * 管理团队
	 *
	 * @return
	 */
	@GetMapping("/team")
	public String team() {
		return "home/other/team";
	}

	/**
	 * 计算器
	 *
	 * @return
	 */
	@GetMapping("/calc")
	public String calc() {
		return "common/calc/calc";
	}

	/**
	 * 公告列表
	 *
	 * @return
	 */
	@GetMapping("/notice-list")
	public String noticeList() {
		return "home/notice/notice-list";
	}

	/**
	 * 公告详情
	 *
	 * @param id
	 * @param model
	 * @return
	 */
	@GetMapping("/notice-detail/{id}")
	public String noticeDetail(@PathVariable int id, Model model) {
		model.addAttribute("id", id);
		return "home/notice/notice-detail";
	}

	/**
	 * 项目列表
	 *
	 * @return
	 */
	@GetMapping("/product-list")
	public String investList() {
		return "home/product/product-list";
	}

	/**
	 * 项目详情
	 *
	 * @param id
	 * @param model
	 * @return
	 */
	@GetMapping("/product-detail/{id}")
	public String investDetail(@PathVariable int id, Model model) {
		model.addAttribute("id", id);
		return "home/product/product-detail";
	}

	/**
	 * 积分商城
	 *
	 * @return
	 */
	@GetMapping("/mall")
	public String mall() {
		return "home/mall/home";
	}

	/**
	 * 商品详情
	 *
	 * @param gid
	 * @param model
	 * @return
	 */
	@GetMapping("/mall/detail/{gid}")
	public String mallDetail(@PathVariable int gid, Model model) {
		model.addAttribute("gid", gid);
		return "home/mall/detail";
	}

}
